package com.springcloud.demo.dynamicTable.dynamic.dao;

import com.springcloud.demo.dynamicTable.dynamic.entity.TableInfoEntity;
import com.springcloud.demo.dynamicTable.dynamic.utils.SqlProducer;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.UpdateProvider;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * @author zhouyang
 * @Description
 * @date 2018/08/13
 */
@Mapper
@Repository
public interface DynamicDao {

    @InsertProvider(type = SqlProducer.class, method = "save")
    int save(TableInfoEntity tableInfoEntity, Map<String, Object> values);

    @UpdateProvider(type = SqlProducer.class, method = "update")
    int update(TableInfoEntity tableInfoEntity, Map<String, Object> values, Map<String, Object> params);

}
